-- GENERATED SPELL FOR [Maraudine Priest] --


function spell0_11685(pUnit, Event) --@Mind Flay,n/a--
pUnit:FullCastSpellOnTarget(16568,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11685', 3000, 1)
end

function spell1_11685(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11685', 18000, 1)
end

function Sorts_11685(pUnit, Event)
local choix_sorts_11685 = math.random(0, 1)
if choix_sorts_11685 == 0 then
pUnit:RegisterEvent('spell0_11685', 1, 1)
end
if choix_sorts_11685 == 1 then
pUnit:RegisterEvent('spell1_11685', 1, 1)
end
end

function mob11685_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11685', math.random(1500, 3000), 1)
end

function mob11685_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11685_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11685_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11685, 1, 'mob11685_Action')
RegisterUnitEvent(11685, 2, 'mob11685_Leave')
RegisterUnitEvent(11685, 3, 'mob11685_Kill')
RegisterUnitEvent(11685, 4, 'mob11685_Die')
